#pragma once
#include <string>
#include <vmmlib/matrix.hpp>
#include <vmmlib/vector.hpp>
#include <Eigen/Eigen>
using namespace std;
using namespace Eigen;

class DataPoint{
public:
	EIGEN_MAKE_ALIGNED_OPERATOR_NEW; //Needed to have fixed Eigen structures as members of class
	DataPoint(void);
	DataPoint(vmml::vec3d* flow,vmml::matrix<3,3,double>* dflow,double ftle);
	~DataPoint(void);
	bool isEmpty();
	//bool isRidge();
	vmml::vec3d*  getFlow();
	vmml::matrix<3,3,double>*  getDFlow();
	double getFTLE();
	string toString();
	VectorXd getGradient();
	VectorXd getEigen();
	MatrixXd getHessian();
	double getSigma();
	void setHessian(const MatrixXd& h);
	void setGradient(const VectorXd& g);
	void setSigma(double s);
	//void setRidge(bool r);
	void setEigen(VectorXd e);

private:
	double sigma; //criteria1
	vmml::vec3d* flow;
	vmml::matrix<3,3,double>* dflow;
	double ftle;
	VectorXd gradient;
	VectorXd eigen;
	MatrixXd hessian;
	vmml::mat4d h;
	bool empty;
	//bool ridge;
};

